<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
	<head>
            <meta charset="utf-8">
            <title><?php echo ($seo_title); ?></title>
            <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
            <meta name="apple-mobile-web-app-capable" content="yes">
            <meta name="apple-mobile-web-app-status-bar-style" content="black">
            <meta name="format-detection" content="telephone=no" />
            <meta name="format-detection" content="email=no" />
            <meta name="keywords" content="<?php echo ($seo_keywords); ?>" />
            <meta name="description" content="<?php echo ($seo_description); ?>">
            <meta name="screen-orientation" content="portrait">
            <meta name="x5-orientation" content="portrait">
            <link rel="shortcut icon" href=" /favicon.ico" />
            <link rel="apple-touch-icon" href="/icon.png" />
            <link rel="apple-touch-start-image" href="/start.png" />

            <link rel="stylesheet" type="text/css" href="/Static/mobile/css/style.css">
            <link rel="stylesheet" type="text/css" href="/Static/mobile/css/SpsBtn.css">
            <script src="/Static/mobile/js/jquery.js"></script>
            <script src="/Static/mobile/js/layer.mobile-v1.6/layer.m.js"></script>
            <script src="/Static/mobile/js/common.js?i=1"></script>
            <script src="/Static/mobile/js/jquery.lazyload.min.js"></script>
            <link rel="stylesheet" type="text/css" href="/Static/mobile/iconfont/iconfont.css">
            <link rel="stylesheet" href="//at.alicdn.com/t/font_813618_4lm1s8y9h0t.css">
            <script>
                var _hmt = _hmt || [];
                (function() {
                  var hm = document.createElement("script");
                  hm.src = "https://hm.baidu.com/hm.js?a524f349a84f50ed8afa8dcd907a59e9";
                  var s = document.getElementsByTagName("script")[0]; 
                  s.parentNode.insertBefore(hm, s);
                })();
            </script>
<?php if(!$is_mobile){ ?>
        <style>
html,body{
    height:100%;
    width:50%;
    margin:0 auto;
}
.nav{
    position:fixed;
    width:25%;

}
.morder_nav{
	position:absolute;
}
</style>
<?php } ?>
	</head>
<body>
    
	<link rel="stylesheet" href="/Static/mobile/vant/index.css">
<link rel="stylesheet" href="//at.alicdn.com/t/font_813618_nz1v6c995rc.css">
<script src="/Static/mobile/vant/vue.min.js"></script>
<script src="/Static/mobile/vant/vant.min.js"></script>
<style>
    body{
        background: #ededed;
    }
    .head{
        background: #fff;
        padding:10px;
    }
    .head-item{
        display: inline-block;
        border-radius: 10px;
        background: #ededed;
        padding: 5px 10px;
        margin:5px;
    }
    .list {
        margin: 10px 0;
        padding-bottom:40px;
    }
    .list h3 {
        color:#e6207a;
    }
    .list-item {
        padding:10px 10px 50px 10px;
        margin:10px 0;
        background: #fff;
        position: relative;
    }
    .imglist img {
        width:32.5%;
        box-sizing: border-box;
        border:1px solid #fff;
        vertical-align: inherit;
    }
    .actions {
        position: absolute;
    }
    .van-tabbar-item--active{		    
        color:#666 !important;		
    }
    iframe{
        width:100%;
    }
</style>
<div style="display: none;" id="app">
     <div class="head">
        <div :class="activeType===index?'active-type':''" @click="activeType=index" v-for="(item,index) in typelist" class="head-item">
            <i v-if="!(activeType===index)" style="color:#e6207a;" class="iconfont icon-hot"></i> 
            <i v-if="(activeType===index)" style="color:#fff;" class="iconfont icon-hot"></i> 
            #{{item.type_name}}#
        </div>
    </div>
    <div class="list">
        <van-list
            v-model="loading"
            :finished="finished"
            @load="onLoad"
        >
            <template
              v-for="(item,index) in showShareList"
              :key="item"
            >
            <div class="list-item">
                <h3 style="font-weight:bold;" @click="onChange(item)">#{{item.share_title}}#</h3>
                <p v-html="item.share_text" style="padding:5px 0;color:#6F6F6F;"></p>
                
                <p v-html="item.share_data" style="padding:5px 0;color:#6F6F6F;">
                </p>
                <div  class="imglist">
                    <img v-if="item.share_thumb.length>1" v-for="img in item.share_thumb" @click="handleFile(item,'preview')" :src="img+'!/min/200/clip/200x200a0a0/gravity/center'"/>
                    <img v-if="item.share_thumb.length==1" v-for="img in item.share_thumb" @click="handleFile(item,'preview')" :src="img"/>
                </div>
                <div style="padding:5px 0;color:#6F6F6F;">发布时间: {{item.create_time}}</div>
                <van-tabbar v-model="active" style="position: absolute;" @change="onChange(item)">
                    <van-tabbar-item @click="handleFile(item,'like')" >
                        <span>收藏</span>
                        <img slot="icon" src="/Static/mobile/index/icon/shoucang.png"/>
                        <!-- <i slot="icon" style="font-size: 20px;" class="icon iconfont icon-like"></i> -->
                    </van-tabbar-item>
                    <van-tabbar-item @click="handleFile(item,'download')">
                        <span >图片下载</span>
                        <img slot="icon" src="/Static/mobile/index/icon/down.png"/>
                        <!-- <i slot="icon" style="font-size: 20px;" class="icon iconfont icon-bookdownload"></i> -->
                    </van-tabbar-item>
                    <van-tabbar-item @click="handleFile(item,'copy')">
                        <span >文字复制</span>
                        <img slot="icon" src="/Static/mobile/index/icon/copy.png"/>
                        <!-- <i slot="icon" style="font-size: 20px;" class="icon iconfont icon-copy"></i> -->
                    </van-tabbar-item>
                    <van-tabbar-item @click="handleFile(item,'share')">
                        <span >一键分享</span>
                        <img slot="icon" src="/Static/mobile/index/icon/weixin.png"/>
                        <!-- <i  slot="icon" style="font-size: 20px;" class="icon iconfont icon-wechat1"></i> -->
                    </van-tabbar-item>
                </van-tabbar>
            </div>
            </template>
        </van-list>
        
    </div> 
</div>

<script>
    function vueInit () {
        var app = new Vue({
            el: '#app',
            data: {
                activeType:'',
                active:-1,
                list: [],
                loading: false,
                finished: false,
                typelist:[],
                sharelist:[],
                page:1
            },
            watch: {
                activeType: function (val,oldval) {
                    this.page = 1;
                    this.sharelist = [];
                    this.loading = false;
                    this.finished = false;
                    this.onLoad();
                }
            },
            created:function () {
                var self = this;
                $.get('/Api/Share/getType').then(function(res){
                    if(res.code=200) {
                        res.data.forEach(function(item){
                            self.typelist.push(item);
                        });
                    }
                });
                // this.onLoad();
                /* $.get('/Api/Share/getShareInfoByType').then(function(res){
                    if(res.code=200) {
                        res.data.forEach(function(item){
                            self.sharelist.push(item);
                        });
                    }
                }) */
            },
            mounted: function () {
                $('#app').show();
            },
            computed: {
                showShareList: function () {
                    return this.sharelist;
                    /* if(this.activeType==='') {
                        return this.sharelist;
                    }else{
                        var list = [];
                        var type = this.typelist[this.activeType];
                        this.sharelist.forEach(function(item){
                            if(item.share_type==type.type_id) {
                                list.push(item);
                            }
                        })
                        return list;
                    } */
                }
            },
            methods: {
                onLoad() {
                    window.v = this;
                    this.loading = true;
                    var self = this;
                    var url = '/Api/Share/getShareInfoByType?page='+this.page;
                    var activeType = this.activeType;
                    var data = {
                        page: this.page,
                    }
                    if(activeType!=='') {
                        var type = this.typelist[this.activeType];
                        //var url = url+'&type_ids='+type.type_id;
                        data['type_ids'] = type.type_id;
                    }
                    $.ajax({
                        url: url,
                        type:'post',
                        data: data
                    }).then(function(res) {
                        if(res.code=200) {
                            if(self.page>=res.page_count) {
                                self.finished = true;
                            }
                            if(res.data.length==0) {
                                self.finished = true;
                            }
                            self.loading = false;
                            self.page++;
                            res.data.forEach(function(item){
                                self.sharelist.push(item);
                            });
                        }
                    })
                    /* $.get(url).then(function(res){
                        
                    }) */
                },
                onChange: function (item) {
                    /* if(this.active==0) {
                        this.handleFile(item,'like');
                    }else if(this.active==1) {
                        this.handleFile(item,'download');
                    }else if(this.active==2) {
                    }else if(this.active==3) {
                        this.handleFile(item,'share');
                    } */
                },
                handleFile:function (msg,type) {
                    window.vv = msg;
                    var text = msg.share_copy;
                   /*  console.log(text);
                    var text = msg.share_text.replace(/\n/g,   " <br>");
                    console.log(text);
                    text = text.replace(/ <br>/g,   " ");
                    console.log(text); */
                    var tasks = [];
                    plus.nativeUI.showWaiting();
                    if(type=='copy') {
                        if(plus.os.name=='Android') {
                            var Context = plus.android.importClass("android.content.Context");
                            var main = plus.android.runtimeMainActivity();
                            var clip = main.getSystemService(Context.CLIPBOARD_SERVICE);
                            plus.android.invoke(clip,"setText",text);
                        }else{
                            // var UIPasteboard  = plus.ios.importClass("UIPasteboard");
                            // var generalPasteboard = UIPasteboard.generalPasteboard();
                            // generalPasteboard.plusCallMethod({setValue:text, forPasteboardType:"public.utf8-plain-text"});
                            // generalPasteboard.plusCallMethod({valueForPasteboardType:"public.utf8-plain-text"});
                        }
                        
                        plus.nativeUI.closeWaiting()
                        return false;
                    }
                    if(type=='preview') {
                        plus.nativeUI.closeWaiting()
                        plus.nativeUI.previewImage(msg.share_thumb);
                        return false;
                    }
                    var imgurls = msg.share_thumb;
                    for(var idx=0;idx<imgurls.length;idx++) {
                        plus.downloader.createDownload(imgurls[idx],'',function(index){
                            return function (d,status) {
                                if(status == 200){ 
                                    var filename = d.filename;
                                    tasks.push({
                                        index:index,
                                        status:status,
                                        filename:filename
                                    });
                                    if(tasks.length==imgurls.length) {
                                        plus.nativeUI.closeWaiting();
                                        //全部下载完成
                                        var files = [];
                                        tasks.forEach(function(item){
                                            files.push(item.filename);
                                        });
                                        if(type=='download') {
                                            var len = 0;
                                            files.forEach(function(file) {
                                                plus.gallery.save(file,function() {
                                                    len++;
                                                    if(len==files.length) {
                                                        alert('保存成功');
                                                    }
                                                    plusobj.delFile(file);
                                                }, function() {
                                                });
                                            })
                                        }else if(type=='share') {
                                            plus.share.sendWithSystem({
                                                pictures:files
                                            }, function(){
                                                files.forEach(function(file) {
                                                    //plusobj.delFile(file);
                                                })
                                            }, function(){});
                                        }else if(type=='like') {
                                            plusobj.shareWeixinPic([files[0]],'WXSceneFavorite');
                                        }
                                       /*   */
                                    }
                                } else {
                                }  
                            }
                        }(idx)).start(); 
                    }
                },
                copy: function () {

                },
            }
        });
    }
    document.addEventListener("plusready",function(){
        vueInit();
    },false);
    
    
</script>
<style>
    .van-cell__title {
        max-width: 90px;
    }

    .van-cell__value {
        text-align: left;
    }
    .active-type {
        color:#fff;
        background: rgb(230, 32, 122);
    }
</style>

<link rel="stylesheet" href="//at.alicdn.com/t/font_813618_4lm1s8y9h0t.css">
<link rel="stylesheet" href="/Static/mobile/vant/index.css">
<script src="/Static/mobile/vant/vue.min.js"></script>
<script src="/Static/mobile/vant/vant.min.js?i=1"></script>
<div id="nav">
	<van-tabbar style="z-index: 1000;">
		<van-tabbar-item url="/mobile/index">
			<span>首页</span>
            <i slot="icon" style="font-size: 20px;<?php echo $controller=='index'?'color:#e6207a;':'';?>" class="icon iconfont icon-home<?php echo $controller=='index'?'fill':'';?>"></i>
        </van-tabbar-item>
        <?php if($is_wechat) { ?>
            <van-tabbar-item url="/mobile/cart/mycart">
                <span>购物车</span>
                <i slot="icon" style="font-size: 20px;<?php echo $controller=='cart'&&$action=='mycart'?'color:#e6207a;':'';?>" class="icon iconfont <?php echo $controller=='cart'&&$action=='mycart'?'icon-gouwuche':'icon-cart_light';?>"></i>
            </van-tabbar-item>
        <van-tabbar-item url="/mobile/qrcode">
            <span>推广</span>
            <i slot="icon" style="font-size: 20px;<?php echo $controller=='qrcode'?'color:#e6207a;':'';?>" class="icon iconfont icon-qrcode<?php echo $action=='lists'?'':'';?>"></i>
        </van-tabbar-item>
        <?php } ?>
       <!--  <?php if(!$is_wechat&&get_device_type()=='ios') { ?>
            <van-tabbar-item url="/mobile/cart/mycart">
                <span>购物车</span>
                <i slot="icon" style="font-size: 20px;<?php echo $controller=='cart'&&$action=='mycart'?'color:#e6207a;':'';?>" class="icon iconfont <?php echo $controller=='cart'&&$action=='mycart'?'icon-gouwuche':'icon-cart_light';?>"></i>
            </van-tabbar-item>
            <van-tabbar-item url="/mobile/login/faxian">
                <span>发现</span>
                <i slot="icon" style="font-size: 25px;<?php echo $controller=='login'?'color:#e6207a;':'';?>" class="icon iconfont icon-faxian<?php echo $controller=='login'?'':'1';?>"></i>
            </van-tabbar-item>
        <?php } ?> -->
        <?php if(!$is_wechat) { ?>
            <van-tabbar-item url="/mobile/login/faxian">
                <span>发现</span>
                <i slot="icon" style="font-size: 25px;<?php echo $controller=='login'?'color:#e6207a;':'';?>" class="icon iconfont icon-faxian<?php echo $controller=='login'?'':'1';?>"></i>
            </van-tabbar-item>
            <van-tabbar-item url="/mobile/qrcode">
                <span>推广</span>
                <i slot="icon" style="font-size: 20px;<?php echo $controller=='qrcode'?'color:#e6207a;':'';?>" class="icon iconfont icon-qrcode<?php echo $action=='lists'?'':'';?>"></i>
            </van-tabbar-item>
        <?php } ?>
        
        <van-tabbar-item url="/mobile/user/">
            <span>我的</span>
            <i slot="icon" style="font-size: 20px;<?php echo $controller=='user'?'color:#e6207a;':'';?>" class="icon iconfont icon-people<?php echo $controller=='user'?'fill':'';?>"></i>
        </van-tabbar-item>
	</van-tabbar>
</div>
<script>
    var nav = new Vue({
        el: '#nav',
        data: {
            os:''
        },
        watch: {
        },
        mounted: function () {
        },
        methods: {
        }
    })
</script>
<style>
</style>
<!-- 如果是微信客户端 -->
<input id="networkType" value="" type="hidden">
<?php if($is_wechat){ ?>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js" type="text/javascript"></script>
<script type="text/javascript">
		wx.config({
		
		<?php if($hlopenid =="oaGjOtyJCTObWB2BZbkLfxyVHTMA"){?>
		 debug:true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，
		
		<?php } ?>
		
		  //若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
		  appId:'<?php echo ($jssign['appid']); ?>', // 必填，公众号的唯一标识
		  timestamp:'<?php echo ($jssign['timestamp']); ?>', // 必填，生成签名的时间戳
		  nonceStr:'<?php echo ($jssign['noncestr']); ?>', // 必填，生成签名的随机串
		  signature:'<?php echo ($jssign['signature']); ?>',// 必填，签名，见附录1
	      jsApiList: [
	                  'checkJsApi',
	                  'onMenuShareTimeline',
	                  'onMenuShareAppMessage',
	                  'onMenuShareQQ',
	                  'onMenuShareWeibo',
	                  'onMenuShareQZone',
	                  'hideMenuItems',
	                  'showMenuItems',
	                  'hideAllNonBaseMenuItem',
	                  'showAllNonBaseMenuItem',
	                  'translateVoice',
	                  'startRecord',
	                  'stopRecord',
	                  'onVoiceRecordEnd',
	                  'playVoice',
	                  'onVoicePlayEnd',
	                  'pauseVoice',
	                  'stopVoice',
	                  'uploadVoice',
	                  'downloadVoice',
	                  'chooseImage',
	                  'previewImage',
	                  'uploadImage',
	                  'downloadImage',
	                  'getNetworkType',
	                  'openLocation',
	                  'getLocation',
	                  'hideOptionMenu',
	                  'showOptionMenu',
	                  'closeWindow',
	                  'scanQRCode',
	                  'chooseWXPay',
	                  'openProductSpecificView',
	                  'addCard',
	                  'chooseCard',
	                  'openCard'
	                ] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
		});
		
		wx.ready(function(){
			//分享到朋友圈
		  wx.onMenuShareTimeline({
		    title:'<?php echo $share_title ? $share_title : C("SHARE_DEFAULT_TITLE");?>', // 分享标题
		    link:'<?php echo $share_url ? $share_url : C("SHARE_DEFAULT_URL");?>', // 分享链接
		    imgUrl:'<?php echo $share_img ? $share_img : C("SHARE_DEFAULT_IMG");?>', // 分享图标
		    success: function(){
		    	
		    },
		    cancel: function(){
		    }
		  });
		  //分享给好友
		  wx.onMenuShareAppMessage({
		    title:'<?php echo $share_title ? $share_title : C("SHARE_DEFAULT_TITLE");?>', // 分享标题
		    desc:'<?php echo $share_description ? $share_description : C("SHARE_DEFAULT_DESC");?>', // 分享描述
		    link:'<?php echo $share_url ? $share_url : C("SHARE_DEFAULT_URL");?>', // 分享链接
		    imgUrl:'<?php echo $share_img ? $share_img : C("SHARE_DEFAULT_IMG");?>', // 分享图标
		    type: '',
		    dataUrl: '',
		    success: function () { 
		    },
		    cancel: function () { 
		
		    }
		  });  
		  
		  wx.getNetworkType({
			    success: function (res) {
			        var networkType = res.networkType; // 返回网络类型2g，3g，4g，wifi
			        $("#networkType").val(networkType);
			    }
			});
		  
		  //复制链接menuItem:copyUrl
		  wx.hideMenuItems({
			 menuList: ["menuItem:originPage",
			            "menuItem:share:facebook",
			            "menuItem:share:qq",
			            "menuItem:share:weiboApp",
			            "menuItem:share:QZone",
			            "menuItem:readMode",
			         //   "menuItem:openWithQQBrowser",
			         //   "menuItem:openWithSafari",
			            "menuItem:share:email",
			            "menuItem:share:brand",
			            "menuItem:copyUrl",//复制链接
			            "menuItem:share:timeline",//朋友圈
			            "menuItem:share:appMessage",//朋友
			            ], // 要隐藏的菜单项，只能隐藏“传播类”和“保护类”按钮，所有menu项见附录3
		      success: function (res) {
		         // alert('已隐藏“阅读模式”，“分享到朋友圈”，“复制链接”等按钮');
		        },
		        fail: function (res) {
		          //alert(JSON.stringify(res));
		        }
		  });
		  
		  //wx.hideOptionMenu();//批量隐藏保护类 传播类按钮
		 
		});

		//浏览图片
		function previewImage(now_pic,pics){
			wx.previewImage({
			   current: now_pic, // 当前显示图片的http链接
			   urls: pics // 需要预览的图片http链接列表
			});
		}
		
		//浏览图片
		$('.previewImageList').on('click', function(){
			var now_pic = $(this).attr("src");
			var pics = new Array();
			
			$('.previewImage').each(function(index) {
				pics[index] = $(this).attr("src");
			 });
			
			previewImage(now_pic,pics);
			
		});

		</script>

<?php } ?>
<script>

var plusobj = {
    createDownload: function (url,callbackFunction) {
        let dtask = plus.downloader.createDownload(url);
        dtask.addEventListener( "statechanged", callbackFunction, false );
        dtask.start(); 
    },
    delFile: function (relativePath) {
        plus.io.resolveLocalFileSystemURL(relativePath, function(entry) {
            entry.remove(function(entry) {
                console.log("文件删除成功==" + relativePath);
            }, function(e) {
                console.log("文件删除失败=" + relativePath);
            });
        });
    },
    shareWeixinPic: function  (files,scene) {
        var self = this;
        plus.share.getServices( function(s){
            var shares = s;
            shares.forEach((item)=>{
              if(item.id='weixin') {
                item.send( {pictures:files,extra:{scene:scene?scene:"WXSceneSession"}}, function(){
                  
                }, function(e){
                  self.delFile(file)
                });
              }
            })
          }, function(e){
            alert( "获取分享服务列表失败："+e.message );
          } );
    },
	shareMsg: function  (msg) {
        var self = this;
        plus.share.getServices( function(s){
            var shares = s;
            shares.forEach((item)=>{
              if(item.id='weixin') {
                item.send(msg, function(){
                }, function(e){
                });
              }
            })
          }, function(e){
          } );
    }
}

function myshare () {
	plus.nativeUI.actionSheet({
		title: '分享到',
		cancel: "取消",
		buttons: [{
			title: "微信消息"
		}, {
			title: "微信朋友圈"
		}]
	}, function(e) {
		var index = e.index;
		if(index<0) {
			return false;
		}
		switch(index) {
			case 1: //分享到微信好友
				plusobj.shareMsg({
					title:'<?php echo $share_title ? $share_title : C("SHARE_DEFAULT_TITLE");?>', // 分享标题
					content:'<?php echo $share_description ? $share_description : C("SHARE_DEFAULT_DESC");?>', // 分享描述
					href: '<?php echo $share_url ? $share_url : C("SHARE_DEFAULT_URL");?>',//分享出去后，点击跳转地址
					thumbs: ['<?php echo $share_img ? $share_img : C("SHARE_DEFAULT_IMG");?>'], //分享缩略图
					extra:{scene:"WXSceneSession"}
				});
				break;
			case 2: //分享到微信朋友圈
				plusobj.shareMsg({
					title:'<?php echo $share_title ? $share_title : C("SHARE_DEFAULT_TITLE");?>', // 分享标题
					content:'<?php echo $share_description ? $share_description : C("SHARE_DEFAULT_DESC");?>', // 分享描述
					href: '<?php echo $share_url ? $share_url : C("SHARE_DEFAULT_URL");?>',//分享出去后，点击跳转地址
					thumbs: ['<?php echo $share_img ? $share_img : C("SHARE_DEFAULT_IMG");?>'], //分享缩略图
					extra:{scene:"WXSceneTimeline"}
				});
				break;
		}
	})
}

document.addEventListener("plusready",function(){
	var token = plus.storage.getItem('token');
	if(token) {
		
		$.get('/mobile/login/tokenLogin?token='+token).then(function(res){
			if(res.ret==1) {
				//清除storage
				plus.storage.removeItem('token');
			}else{
				//alert('登录成功');
			}
		})
	}
	//plus.webview.currentWebview().setStyle({titleNView: {buttons: []}});
	if(plus.os.name=='Android') {
		/* if(plus.runtime.version=='1.0') {
			var url="http://ui.vip36.cn/android2.apk"; 
			var dtask = plus.downloader.createDownload( url, {}, function ( d, status ) {
				if ( status == 200 ) { 
					var path = d.filename;
					plus.runtime.install(path);
				} else {
					alert( "Download failed: " + status ); 
				}  
			});
			dtask.start(); 
		} */
	}
},false);

</script>
<style>
        .morder_nav section.cur, .morder_nav section.cur a {
            color:#e6207a;
        }
        .morder_nav section i {
            background-color: #e6207a;
        }
        .weui-btn_primary{
            background-color: #e6207a;
        }
        .Integral{
            background-color: #e6207a;  
        }
        .van-button--primary {
            color: #fff;
            background-color: #e6207a;
            border: 1px solid #e6207a;
        }
        .swiper-pagination-bullet-active{
            background-color: #e6207a;
        }
        .mdetail_goodsdet_tit span.cur{
            color: #e6207a;
        }
        .mdetail_goodsdet_tit span i{
            background-color: #e6207a;
        }

    </style>
<script>
//image lazyload
$(function(){
    $("img.lazyload").lazyload({
        threshold:650
    });
});
<?php if($showad) { ?>
var html = '<div><?php echo htmlspecialchars_decode(C('AD_DETAIL'));?></div>';
var pageii = layer.open({
  type: 1
  ,content: html
  ,anim: 'up'
  ,style: 'position:fixed;overflow:scroll; left:0%; top:0%; width:100%; height:100%; border: none; -webkit-animation-duration: .5s; animation-duration: .5s;'
});      
var adHeight = $('#showad').height();
$('.layui-m-layercont').css('height',adHeight+'px');
$('.layermanim').css('height',adHeight+'px');
$('img').css('width','100%');

setTimeout(function() {
    layer.closeAll();
}, <?=C('AD_TIME')*1000?>);

<?php } ?>

</script>

</body>
</html>